# openbox-config

A config that mimics traditional desktop environment in Openbox. Available in Dark and Light variants.

<img src="https://notabug.org/adnan360/openbox-config/raw/master/assets/screenshot-01.png" title="Openbox config screenshot light theme" alt="Openbox config screenshot light theme" />

<img src="https://notabug.org/adnan360/openbox-config/raw/master/assets/screenshot-02.png" title="Openbox config screenshot dark theme" alt="Openbox config screenshot dark theme" />


## Install Prerequisites

_Arch Linux:_

```
sudo pacman -S openbox tint2 perl-gtk3 obmenu-generator xdotool network-manager-applet gsimplecal rofi papirus-icon-theme volumeicon cbatticon slim
pakku -S ksuperkey  # install through AUR
# Apply slim theme
sudo cp -r other/greeny_dark/ /usr/share/slim/themes/
sudo sed -i "s/\(^current_theme.*\)/#\1\ncurrent_theme  greeny_dark/" /etc/slim.conf
```

\* Some packages are optional and depends upon your preference.<br/>
\* `perl-gtk3` is for generating menu with [icons](https://forum.manjaro.org/t/obmenu-generator-i-error/124436). When `gtk2-perl` is only available, install it and then comment the `use_gtk3` line on `~/.config/obmenu-generator/config.pl`. (See Troubleshooting section below for details)

Optionally, install these packages to configure:

```
sudo pacman -S lxappearance obconf
```


## Installation

Make sure Python3 and `python3-pip` is installed. Then:

```
sudo pip install dotdrop
cd /path/to/this/repo
# For light theme
dotdrop install --profile=default
# For dark theme
dotdrop install --profile=dark
```

Afterwards:
- Launch `lxappearance`, go to **Icon Theme** tab and and change icon to **Papirus** to show proper icons on system tray.
- To choose a GTK theme you can choose **Adwaita**, **Adwaita-dark** or anything else from `lxappearance` to match your Openbox theme.

Then reboot to an Openbox session. If you have multiple DEs installed, you can press F1 on slim login screen to choose Openbox.


## Customization

Some customization changes require editing a yaml file for convenience. The `custom.yaml` file overrides the default values.

```
cp custom.default.yaml custom.yaml
# or...
cp custom.default.yaml ~/.local/share/openbox-config/custom.yaml
# or you can copy just the variables you want to change
# change the variables (see below) ... then:
dotdrop install --profile=default # or --profile=dark
```

##### 1\. Adding/removing apps on Tint2 panel

Edit `quick_launch_items` on `custom.yaml`.

##### 2\. Changing apps on Openbox menu

Edit `custom.yaml`.

##### 3\. Changing clock format

Edit `clock_1_format` and `clock_2_format` on `custom.yaml`.

##### 4\. Remove icon from Show Desktop button

Set `show_desktop_icon_visible` to `false` on `custom.yaml`. e.g.

```
show_desktop_icon_visible: false
```

##### 5\. Add items to startup

Edit `autostart_items_add` on `custom.yaml`.


## Troubleshooting

### `obmenu-generator -i` saying invalid output and there is no `libgtk2-perl` package available

I have faced this on Debian Testing. Here's what you can do for Debian:

- Install from the repos [here](https://software.opensuse.org/download.html?project=home%3AHead_on_a_Stick%3Aobmenu-generator&package=obmenu-generator). If not possible, install manually:
```
git clone --depth=1 https://github.com/trizen/obmenu-generator.git
cd obmenu-generator
sudo cp obmenu-generator /usr/bin/obmenu-generator
sudo cp schema.pl /etc/xdg/obmenu-generator/schema.pl
sudo apt install libgtk3-perl perl-linux-desktopfiles libdata-dump-perl
```
- There is a `"use_gtk3" => 1,` [line](https://github.com/trizen/obmenu-generator/commit/d7685c5a95d302b9a998f911e96d7853160bcb5a) in `~/.config/obmenu-generator/config.pl`. Make sure it is there and uncommented. Now it should work as expected.
